function [fprior, p] = prior(x)

% Prior for x

p = zeros(1,length(x));

j=1 ;

p(j) = log(betapdf(x(j),5.05556,5.05556)); j = j+1;
p(j) = log(betapdf(x(j),5.05556,5.05556)); j = j+1;
p(j) = log(betapdf(x(j),5.05556,5.05556)); j = j+1;
p(j) = log(betapdf(x(j),5.05556,5.05556)); j = j+1;
p(j) = log(betapdf(x(j),5.05556,5.05556)); j = j+1;

p(j) = log(unifpdf(x(j),eps,4)); j=j+1 ;
p(j) = log(unifpdf(x(j),eps,4)); j=j+1 ;
p(j) = log(unifpdf(x(j),eps,4)); j=j+1 ;
p(j) = log(unifpdf(x(j),eps,4)); j=j+1 ;
p(j) = log(unifpdf(x(j),eps,4)); j=j+1 ;
p(j) = log(unifpdf(x(j),eps,4)); j=j+1 ;

fprior = sum(p);
